import Person from './person';
class Student extends Person
{
    constructor(id,name,age,classT){
        super(id,name,age);
        this.klass = classT;
    }
    introduce(){
        if(!this.classT.leader)
        {
            return super.introduce() + ` I am a Student. I am at Class ${this.classT.number}.`;
        }
        else if(this.id == this.classT.leader.id)
        {
            return super.introduce() + ` I am a Student. I am Leader of Class ${this.classT.number}.`;
        }
        else
        {
            return super.introduce() + ` I am a Student. I am at Class ${this.classT.number}.`;
        }
    }
}
module.exports = Student;